import { Tabs } from 'antd'
import React from 'react'

const onlineStudentsDate =  ["6-28", "6-29", "6-30", "7-1", "7-2"]
const onlineStudentsCount = [9160, 7000, 4300, 8500, 6000]

const courseSalesDate =  ["6-28", "6-29", "6-30", "7-1", "7-2"]
const courseSalesCount = [100, 280, 360, 120, 300]

const visitDate =  ["6-28", "6-29", "6-30", "7-1", "7-2"]
const visitCount = [9999, 10230, 49123, 8888, 7002]

const MyTab = (props) => {
    const { TabPane } = Tabs
  
    
    function callback(key) {
      
      }
    const Component = props.component
    return <div>
        <Tabs defaultActiveKey="1" onChange={callback}>
    <TabPane tab="在线听课人数" key="1" name="1">
      <Component x={onlineStudentsDate} y={onlineStudentsCount} name='onlineStudents' />
    </TabPane>
    <TabPane tab="课程购买量" key="2" name="courseSales">
    <Component x={courseSalesDate} y={courseSalesCount} name='courseSales'/>
    </TabPane>
    <TabPane tab="课程访问量" key="3" name="3">
    <Component x={visitDate} y={visitCount} name='visi'/>
    </TabPane>
  </Tabs>
</div>
};
export default MyTab